summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/items-tech/page.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-05-28 06:35:43 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-05-28 06:35:43 +0000
commit2caa8093ac616f14d48430ce2f485f805d6faa53 (patch)
treeee2e1f1fbf316dfc9e4090970b92d6bad36a3e11 /app/[lng]/evcp/(evcp)/items-tech/page.tsx
parentc2aa314651219686f78700e87135485a8be91264 (diff)
(최겸) 기술영업 아이템 조회
Diffstat (limited to 'app/[lng]/evcp/(evcp)/items-tech/page.tsx')
-rw-r--r--app/[lng]/evcp/(evcp)/items-tech/page.tsx62
1 files changed, 62 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/items-tech/page.tsx b/app/[lng]/evcp/(evcp)/items-tech/page.tsx
new file mode 100644
index 00000000..52ff519d
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/items-tech/page.tsx
@@ -0,0 +1,62 @@
+import * as React from "react"
+import { type SearchParams } from "@/types/table"
+
+import { getValidFilters } from "@/lib/data-table"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+import { searchParamsCache } from "@/lib/items-tech/validations"
+import { getShipbuildingItems, getOffshoreTopItems, getOffshoreHullItems } from "@/lib/items-tech/service"
+import { OffshoreTopTable } from "@/lib/items-tech/table/top/offshore-top-table"
+import { OffshoreHullTable } from "@/lib/items-tech/table/hull/offshore-hull-table"
+
+// 대소문자 문제 해결 - 실제 파일명에 맞게 import
+import { ItemsShipTable } from "@/lib/items-tech/table/ship/Items-ship-table"
+
+interface IndexPageProps {
+ searchParams: Promise<SearchParams>
+}
+
+export default async function IndexPage({ searchParams }: IndexPageProps) {
+ const params = await searchParams
+ const search = searchParamsCache.parse(params)
+ const validFilters = getValidFilters(search.filters || [])
+
+ // URL에서 아이템 타입 가져오기
+ const itemType = params.type || "ship"
+
+ return (
+ <div>
+ {itemType === "ship" && (
+ <ItemsShipTable
+ promises={Promise.all([
+ getShipbuildingItems({
+ ...search,
+ filters: validFilters,
+ }),
+ ]).then(([result]) => result)}
+ />
+ )}
+
+ {itemType === "top" && (
+ <OffshoreTopTable
+ promises={Promise.all([
+ getOffshoreTopItems({
+ ...search,
+ filters: validFilters,
+ }),
+ ]).then(([result]) => result)}
+ />
+ )}
+
+ {itemType === "hull" && (
+ <OffshoreHullTable
+ promises={Promise.all([
+ getOffshoreHullItems({
+ ...search,
+ filters: validFilters,
+ }),
+ ]).then(([result]) => result)}
+ />
+ )}
+ </div>
+ )
+}